# lintcode: (55) Compare Strings
# Compare two strings A and B, determine whether A contains all of the characters in B.

# The characters in string A and B are all Upper Case letters.

# Example
# For A = "ABCD", B = "ABC", return true.

# For A = "ABCD" B = "AABC", return false.
# import sys
# s1 = sys.argv[1]
# s2 = sys.argv[2]
def wordCount(s):
	mp = {}
	for i in s:
		mp[i]=mp.get(i,0)+1  
	return mp

def compareStr(a,b):
	if(len(b)> len(a)):
		return False

	map_a = wordCount(a)
	map_b = wordCount(b)
	for k in map_b.keys():
		if not map_a[k] == map_b[k]:
			return False
	return True

#接收键盘输入的值
s1 = input("请输入第一个str: ")
s2 = input("请输入第二个str: ")
# 构造了两个map ,考虑了第二个字符串比第一个长的异常情况
print(compareStr(s1,s2))